package com.sunshine.session.defaults;

import com.sunshine.binding.MapperRegistry;
import com.sunshine.session.Configuration;
import com.sunshine.session.SqlSession;
import com.sunshine.session.SqlSessionFactory;

/**
 * @author Mokairui
 * @description
 * @since 2022/10/30
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {
    
    private final Configuration configuration;
    
    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }
    
    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
